<?php
  //Genesis Software Manual - Page 15

$text_space = 4.4;

$edge = array(
	"MARGIN" => 36,
	"BULLET" => 42,
	"INSET_LIST" => 50);

$pdf->AddPage();

//$pdf->Image('./Genesis/Gen-soft/Gsm-08.png',0,0,210 ,297);

///add_raster($pdf);

$pdf->Bookmark('C. VDP structure',1);

$pdf->SetTextColor(0,0,0);
$pdf->SetFont('arial','B',10);
$pdf->Text($edge ["MARGIN"], new_line(37), "C. VDP STRUCTURE");
$pdf->SetFont('arial','',10);

$pdf->Text($edge["BULLET"], new_line(45), "The CPU controls the VDP by special I/O memory locations.");

blist_new (1);

$pdf->Bookmark('1. CTRL',2);

new_line ();

blist_item (	$pdf,
		"CTRL (control)",
		"This controls REGISTER, VRAM, CRAM, VSRAM, DMA DISPLAY, etc.");

$pdf->Bookmark('2. VRAM',2);

new_line ();

blist_item (	$pdf,
		"VRAM (VDP RAM)",
		"General purpose storage area for display data");

$pdf->Bookmark('3. CRAM',2);

new_line ();

blist_item (	$pdf,
		"CRAM (COLOR RAM)",
		"64 colors divided into 4 palettes of 16 colors each.");

$pdf->Bookmark('4. VSRAM',2);

new_line ();

blist_item (	$pdf,
		"VSRAM (Vertical Scroll RAM)",
		"Up to 20 different vertical scroll values each for scrolling play fields A and B.");

$pdf->Bookmark('5. DMA',2);

new_line ();

blist_item (	$pdf,
		"DMA (Direct Memory Access)",
		"The VDP may move data at high speed from CPU memory to VRAM, CRAM, and VSRAM",
		"instead of the CPU, by taking the 68000 off the bus and doing DMA itself.",
		"",
		"The VDP can also fill the VRAM with a constant, or copy from VRAM to VRAM without",
		"disturbing the 68000.");

// diagram

$pdf->SetDrawColor(0, 0, 0);
$pdf->SetFillColor (255, 255, 255);

$pdf->Rect (70,  170, 70, 70, "DF"); // vdp

$pdf->SetLineWidth (0.2);
$pdf->Line (50, 200, 160, 200); // Addr
$pdf->Line (88, 200, 88, 188);
$pdf->Line (88, 188, 90, 188);
$pdf->Line (92, 200, 92, 220);
$pdf->Line (108, 200, 108, 220);
$pdf->Line (110, 185, 112, 185);
$pdf->Line (112, 200, 112, 185);

$pdf->SetLineWidth (0.6);
$pdf->Line (50, 210, 160, 210); // Data
$pdf->Line (82, 210, 82, 182);
$pdf->Line (82, 182, 90, 182);
$pdf->Line (88, 210, 88, 220);
$pdf->Line (112, 210, 112, 220);
$pdf->Line (100, 210, 100, 200);

$pdf->SetLineWidth (0.2);

$pdf->Rect (40,  170, 10, 70, "DF"); // cpu
$pdf->Rect (160, 180, 20, 50, "DF"); // vram
$pdf->Rect (90,  178, 20, 14, "DF"); // dma
$pdf->Rect (90,  196, 20, 8, "DF"); // ctrl
$pdf->Rect (115,  206, 22.5, 8, "DF"); // 16/8
$pdf->Rect (77.5, 220, 20, 8, "DF"); // cram
$pdf->Rect (102.5, 220, 20, 8, "DF"); // vsram

$pdf->CenterText (40, 205 + 1, "CPU", 10);
$pdf->CenterText (160, 205 + 1, "VRAM", 20);
$pdf->CenterText (120, 180 + 1, "VDP", 10);
$pdf->CenterText (90, 185 + 1, "DMA", 20);
$pdf->CenterText (90, 200 + 1, "CTRL", 20);
$pdf->CenterText (115, 210 + 1, "8/16 Change", 22.5);
$pdf->CenterText (77.5, 224 + 1, "CRAM", 20);
$pdf->CenterText (102.5, 224 + 1, "VSRAM", 20);

$pdf->CenterText (50, 200 - 2.2, "ADDR",    20);
$pdf->CenterText (50, 210 - 2.2, "16 DATA", 20);
$pdf->CenterText (140, 210 - 2.2, "8", 20);

add_footer($pdf,'02/21/92','8');
?>
